//
//  SEGNoSearchCommunityResultView.m
//  SEGUhomeStandard
//
//  Created by 揭婧雯 on 2018/8/21.
//  Copyright © 2018年 刘山. All rights reserved.
//

#import "SEGNoSearchCommunityResultView.h"

@implementation SEGNoSearchCommunityResultView

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self setUpUI];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setUpUI];
    }
    return self;
}

- (void)setUpUI
{
    self.backgroundColor = kColor_W;
    UIImageView *imageView = [[UIImageView alloc] init];
    imageView.image = [UIImage imageWithContentsOfFile:SEGPicName(@"pic_default_search")];
    [self addSubview:imageView];
    [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self).offset(80);
        make.centerX.equalTo(self);
    }];
    
    UILabel *label = [[UILabel alloc] init];
    label.font = kFont_13;
    label.textColor = kColor_3;
    label.numberOfLines = 0;
    label.textAlignment = NSTextAlignmentCenter;
    label.text = @"抱歉，没有找到对应的社区，请确保您输入的名\n称正确或联系物业管理处。";
    [self addSubview:label];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(15);
        make.right.equalTo(self).offset(-15);
        make.top.equalTo(imageView.mas_bottom).offset(30);
    }];
}

#pragma mark - UITraitEnvironment
- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
    [super traitCollectionDidChange:previousTraitCollection];
    self.confirmButton.layer.borderColor = kColor_1.CGColor;
}

@end
